<extend name="Public/base"/>
<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu" />
</block>
<!-- css样式 -->
<block name="body">
<style type="text/css">
    #houtai{font-size: 20px;  font-weight: 400; color: #445566;}
    .xian{float: none;padding-top: 108px;}
    .f1{margin-left: 10px;}
    .data-table,td{border: 1px solid lightgrey;margin-top:27px;}
    .xinzen{float:left;}
    .xinzen .btn{font-size: 18px;margin-top: 49px;margin-left: -100px}
</style>
<div class="main-title">
    <h2 id="houtai"><span>优惠劵管理</span></h2>
    <!-- 工具栏 -->
    <div class="product_headcut">
        <div class="f1">
            <!-- 高级搜索 -->
            <form class="search-form fr cf">
                <div class="xinzen">
                    <a class="btn" href="admin.php?s=/Coupon/order.html">创建优惠券</a>
                </div>
            </form>
        </div>
        <div class="xian">
            <hr>
        </div>
        <!-- 数据表格 -->
        <div class="data-table">
            <table>
                <!-- 表头 -->
                <thead>
                <tr>
                    <th>优惠券模板ID</th>
                    <th>名称</th>
                    <th>优惠类型</th>
                    <th>单张面额/折扣</th>
                    <th>使用条件</th>
                    <th>已领取/总发行量</th>
                    <th>发行时间</th>
                    <th>有效期</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.title}</td>
                            <td>{$vo.full_type}</td>
                            <td>{$vo.denomination}</td>
                            <td>{$vo.condition}</td>
                            <td>{$vo.circulation}</td>
                            <td>{$vo.release_time}</td>
                            <td>{$vo.validity}</td>
                            <td>
                                <a href="admin.php?s=/Coupon/order/id/{$vo.id}.html">编辑</a>
                            </td>
                        </tr>
                    </volist>
                </notempty>
                </tbody>
            </table>
        </div>
    </div>
</div>
</block>
<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript">
        $(function() {
            //搜索功能
            $("#search").click(function () {
                var url = $(this).attr('url');
                var query = $('.search-form').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                } else {
                    url += '?' + query;
                }
                window.location.href = url;
            });
            //回车搜索
            $(".search-input").keyup(function (e) {
                if (e.keyCode === 13) {
                    $("#search").click();
                    return false;
                }
            });
            //导航高亮
            highlight_subnav('admin.php?s=/Coupon/index.html');
        });
    </script>
</block>
